﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IBatisNet.DataMapper;
using IBatisNet.DataMapper.Configuration;

namespace DeviceMonitor.Dao
{
    class SqlMapDao
    {
        public static ISqlMapper instance()
        {
            DomSqlMapBuilder builder = new DomSqlMapBuilder();
            ISqlMapper mapper = builder.Configure("Config/SqlMap.config");
            return mapper;
        }

        internal static void Insert<T>(string v, T model)
        {
            instance().Insert(v, model);
        }
        internal static void Update<T>(string v, T model)
        {
            instance().Update(v, model);
        }
        internal static void Delete(string v1, int v2)
        {
            instance().Delete(v1, v2);
        }
    }
}
